package com.ggymm.browser.sample.util;

/**
 * Utility class for creating data: URIs that can be passed to CefBrowser.loadURL.
 */
public class DataUri {
    public static String create(String mimeType, String contents) {
        return "data:" + mimeType + ";base64,"
                + java.util.Base64.getEncoder().encodeToString(contents.getBytes());
    }
}
